package org.wuqi.microweb.api.testmethod;

/**
 * @author jjj
 * @program: earnest-money
 * @description:TODO
 * @date 2024-01-05 10:24:25
 */
public class SyncThread4 implements Runnable{
    static int i = 100;
    public synchronized void doSth(){
//        System.out.println("Hello World");
        i++;
    }
    @Override
    public void run() {
        for (int j = 0; j < 100; j++) {
            doSth();
            System.out.println("<====="+i+"====>");
        }
    }
}
 
 